<template>
	<view class="w100 bg-white items radius-10" >
		<view class="img pd-20 bb flex_l" @click="toStore(item.id)">
			<view class="radius-10">
				<image :src="item.cove_image" mode=""></image>
			</view>
			<view class="h100 ml-30 u-flex-1 flex1 flex-between flex-column over-hidden">
				<view class="u-line-2 bold">
					{{item.merchant_name}}
				</view>
				<view class="size-26 gray-2">
					<text>{{item.cate_name}}</text>
					<text class="mlr-10">|</text>
					<text>共{{item.product_count}}个服务</text>
				</view>
				<view class="flex size-24">
					<text class="yellow" v-if="item.distance">{{item.distance}}km</text>
				</view>
			</view>
		</view>
		<view @click="toGoods(items.id)" class="flex_l item plr-20 ptb-10" v-for="(items,i) in item.child" :key="i">
			<view class="" style="width: 120rpx;">
				<view class="red">
					<text class="size-24">￥</text>
					<text class="size-30">{{items.set_meal_price}}</text>
				</view>
				<view class="size-24 gray-3" style="text-decoration: line-through;">
					￥{{items.market_price}}
				</view>
			</view>
			<view class="size-28">
				{{items.name}}
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		props:{
			item:{
				type:Object
			}
		},
		data() {
			return {

			};
		},
		methods:{
			toStore(id){
				uni.navigateTo({
					url: '/pages/home/store-detail?store_id='+id
				})
			},
			toGoods(id){
				uni.navigateTo({
					url: '/pages/home/good-detail?goods_id='+id
				})
			}
		}
	}
</script>

<style lang="scss">
	.img {
		height: 170rpx;
		image {
			width: 130rpx;
			height: 130rpx;
			border-radius: 10rpx;
		}
	}
	.item{
		border-bottom: 1rpx solid $bg;
		&:last-child{
			border-bottom: none;
		}
	}
	.items{
		border-bottom: 20rpx solid $bg;
	}
</style>
